package io.renren.modules.statistis.dao;

import io.renren.modules.generator.entity.TObjectEntity;
import io.renren.modules.generator.entity.TTrainingScoreEntity;
import io.renren.modules.statistis.statistisEntity;
import io.renren.modules.user.entity.TPeopleEntity;
import io.renren.modules.user.entity.TPeopleFireDetachmentEntity;
import io.renren.modules.user.entity.vo.PeopleVo;
import io.renren.modules.user.entity.vo.PeopleZZVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface statistisDao {

    /**
     * 测试
     * @return
     */
    List<TObjectEntity> getTest();

    /**
     * 按人员类型进行分类统计
     */
    List<TPeopleEntity> getTPeople(statistisEntity read);
    /**
     *按下级部门进行分类统计
     */
    List<TPeopleFireDetachmentEntity> getTPeopleFireDetachment(statistisEntity read);
    /**
     * 人员自定义分析
     */
    List<TPeopleEntity> getSelfEmployed(statistisEntity read);
    /**
     * 人员衔级分布
     */
    List<Map<String,Object>> getRyxjfb(PeopleVo peopleVo);
    /**
     * A．战斗类型统计
     */
    List<Map<String,Object>> getZdlxtj(statistisEntity read);
    /**
     * B．下属单位战斗次数统计
     */
    List<Map<String,Object>> getXsdwzdcstj(statistisEntity read);
    /**
     * C．本年度战斗次数统计
     */
    List<Map<String,Object>> getBndzdcstj(statistisEntity read);
    /**
     * D．历史年份同月战斗次数类型统计
     */
    List<Map<String,Object>> getLsnftyzdcslxtj(statistisEntity read);


    /**
     * 合同统计
     * @param parentId
     * @param squadron
     * @return
     */
    List<PeopleZZVo> getRyhtfb(@Param("parentId")String parentId, @Param("squadron") String squadron);
    /**
     * 考核成绩 分布图
     */
    List<TTrainingScoreEntity> achievementStatistics(statistisEntity read);
    /**
     * #下级单位考核合格率分析图
     */
    List<TTrainingScoreEntity> passRateStatistics(statistisEntity read);
    /**
     * ############单位考核均值
     */
    List<TTrainingScoreEntity> companyStatistics(statistisEntity read);
    /**
     *#历史成绩曲线图
     */
    List<TTrainingScoreEntity> historicalResultsStatistics(statistisEntity read);
    /**
     * 自主 人员分布
     */
    List<TPeopleEntity> peopleStatistics(statistisEntity read);
    /**
     * 人员参训情况统计分析
     */
    List<TPeopleEntity> peopleJoinStatistics(statistisEntity read);
    /**
     *人员带训情况
     */
    List<TPeopleEntity> peopleUncommittedStatistics(statistisEntity read);
    /**
     *人员战斗情况分析
     */
    List<TPeopleEntity> fightPeopleStatistics(statistisEntity read);
    /**
     * 重大考核任务合格率走势图
     */
    List<Map<String,Object>> a();

    List<Map<String, Object>> findScoreDistribution(@Param("trainingCheckId") Integer trainingCheckId);
    /**
     * 总队合格率
     */
    List<Map<String, Object>> findDeptPassRate(@Param("trainingCheckId") Integer trainingCheckId);
    /**
     * 支队合格率
     */
    List<Map<String, Object>> findZdeptPassRate(@Param("trainingCheckId") Integer trainingCheckId,@Param("parentId")Integer parentId);
    /**
     * 班组合格率
     */
    List<Map<String, Object>> findClassPassRate(@Param("trainingCheckId") Integer trainingCheckId,@Param("parentId")Integer parentId);
    /**
     * 重大考核合格率走势
     */
    List<Map<String, Object>> findImportantTrainingPassTrend(@Param("trainingId") Integer trainingId);

    /**
     * 历史成绩曲线图
     */
    List<Map<String, Object>> peopleHistoryScore(@Param("peopleId") Integer peopleId);
    /**
     * 能力分析雷达图
     */
    List<Map<String, Object>> peopleAbilityAnalysis(@Param("peopleId") Integer peopleId);
    /**
     * 个人考核指标成长曲线图
     */
    List<Map<String, Object>> peoplePersonalGrowth(@Param("peopleId") Integer peopleId,@Param("list")List<Integer> list);
    /**
     * 人员成绩对比
     */
    List<Map<String, Object>> personalScoreCompare(@Param("trainingCheckId") Integer trainingCheckId,@Param("list")List<Integer> list);
    /**
     * 人员指标成绩对比
     */
    List<Map<String, Object>> personalObjectScoreCompare(@Param("peopleId") Integer peopleId,@Param("list")List<Integer> list);
    /**
     * 单位平均成绩
     */
    List<Map<String, Object>> detachmentScoreCompare(@Param("trainingCheckId") Integer trainingCheckId,@Param("list")List<Integer> list);
    /**
     * 单位指标成绩对比分析
     */
    List<Map<String, Object>> detachmentObjectScoreCompare(@Param("detachmentList")List<Integer> detachmentList,@Param("objectList")List<Integer> objectList);
    /**
     * 根据考核ID查人员
     */
    List<Map<String, Object>> selectPeopleByCheckId(@Param("trainingCheckId") Integer trainingCheckId);

    /**
     * 根据考核ID查单位
     */
    List<Map<String, Object>> selectDetachmentByCheckId(@Param("trainingCheckId") Integer trainingCheckId);
}
